/**
 * Copyright 2009 Adam Ruggles.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.code.sapien.service;

import com.google.code.sapien.model.Discussion;
import com.google.code.sapien.util.PaginatedResult;
import com.google.inject.ImplementedBy;

/**
 * Provides an interface for service operations on {@link com.google.code.sapien.model.Discussion} entities.
 * @author Adam
 * @version $Id: DiscussionService.java 24 2009-05-15 04:38:19Z a.ruggles $
 * 
 * Created on Feb 17, 2009 at 11:15:33 PM 
 */
@ImplementedBy(DiscussionSapienService.class)
public interface DiscussionService extends EntityService<Discussion> {

	/**
	 * Returns a {@link com.google.code.sapien.util.PaginatedResult} of discussions order by modified date in
	 * descending order.
	 * @param page The current page number.
	 * @param resultsPerPage The number of results per page.
	 * @return A {@link com.google.code.sapien.util.PaginatedResult} of discussions.
	 */
	PaginatedResult<Discussion> getModifiedDesc(int page, int resultsPerPage);

	/**
	 * Returns a {@link com.google.code.sapien.util.PaginatedResult} of discussions order by modified date in
	 * descending order under the given category.
	 * @param categoryId The category id.
	 * @param page The current page number.
	 * @param resultsPerPage The number of results per page.
	 * @return A {@link com.google.code.sapien.util.PaginatedResult} of discussions.
	 */
	PaginatedResult<Discussion> getModifiedDesc(Long categoryId, int page, int resultsPerPage);
}
